(
s.waitForBoot({
	a={arg mod=0.05, index=0.05, f=440, p=660, b=4;
			var r,out,out2;
			r=Saw.ar(b,0.03).scope;
			out=SinOsc.ar(f,
				660*mod,3*index, 0,
				Lag.ar(r,0.01,1));
			[out];//,Delay1.ar(out)];

			}.scope(zoom: 4);

	w = Window("Slider2D", Rect(100,Window.screenBounds.height-400, 300 ,300));
	w.view.decorator = FlowLayout(w.view.bounds);
	t = Slider2D(w, Rect(0, 0,100, 100))
			.y_(0.05)
			.x_(0.05)
			.action_({|sl|
				a.set(\mod,sl.x,\index,sl.y);
			});
	u = Slider2D(w, Rect(0, 0,100, 100))
			.y_(4000)
			.x_(0)
			.action_({|sl|
				a.set(\f,sl.x*4000,\b,sl.y*20);
			});			
	w.front;
	CmdPeriod.doOnce({w.close});
})
)

(
e = Env.linen(2, 5, 2);
Routine.run({ 
	loop({
		play({
			LinPan2.ar(EnvGen.ar(e) *
				PMOsc.ar(2000.0.rand,800.0.rand, Line.kr(0.0, 12.0.rand,9),0,0.1), 1.0.rand2)});
		1.wait;
	})
}))